{include file="public/_meta" /}
<title></title>
<meta name="keywords" content="">
<meta name="description" content="">
</head>

<body>
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>会员管理 <span class="c-gray en">&gt;</span> 会员激活 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <article class="page-container">
        <form class="form form-horizontal" id="form-admin-add">
            <input type="hidden" name="id" value="{$id}" />
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>会员类别：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <select name="us_abc" >
                        <option value="1" >A类</option>
                        <option value="2" >B类</option>
                        <option value="3" >C类</option>
                    </select>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>会员星级：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <select name="us_level" >
                        <option value="2" {if condition = "$us_level eq 2"} selected="selected"{/if}>一星会员</option>
                        <option value="4" {if condition = "$us_level eq 4"} selected="selected"{/if}>二星会员</option>
                        <option value="6" {if condition = "$us_level eq 6"} selected="selected"{/if}>三星会员</option>
                    </select>
                </div>
            </div>             
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>结算法：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <select name="us_award_type" >
                        <option value="1" >全额</option>
                        <option value="0.5" >半价</option>
                        <option value="0" >免费</option>
                    </select>
                </div>
            </div>
            
        
            <div class="row cl">
                <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                    <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;激活&nbsp;&nbsp;" onclick="return add()">
                </div>
            </div>
        </form>
    </article>
    {include file="public/_footer"/}
    <!--请在下方写此页面业务相关的脚本-->
 
    <script type="text/javascript">

    $(function(){
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });
    });
    function add(){
        $.post("{:url('doactivate')}", $('form').serialize()).success(function(data) {
            layer.msg(data.msg);
            if (data.code) {
                setTimeout(function() {
                    window.parent.location.reload();//s刷新父页面
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);//关闭当前弹窗
                   location.href = '';
                }, 500);
            }
        });
        return false;
    }
    function eee(dada) {
        var data = new FormData();
        data.append('file', dada[0].files[0]);
        var index = layer.load(1, { shade: false }); //0代表加载的风格，支持0-2
        $.ajax({
            url: '{:url("upload")}',
            type: 'POST',
            data: data,
            cache: false,
            contentType: false,
            processData: false,
            success: function(data) {
                layer.msg(data.msg);
                if (data.code) {
                    $('.logo').attr('src',data.data);
                    $('input[name="ca_pic"]').val(data.data);
                }
                layer.close(index);
            },
            error: function() {
                layer.close(index);
                layer.msg('上传出错');
            }
        });
    }
    </script>
</body>

</html>